/* 
 * File:   vertexdefinition.h
 * Author: marcell
 *
 * Created on 28. Februar 2011, 13:51
 */

#ifndef VERTEXDEFINITION_H
#define	VERTEXDEFINITION_H

#include <GL/glew.h>
#include "glmmivertexdefinition.h"
#include "glmmvertexdescription.h"

class VertexDefinition : public glmmIVertexDefinition
{
private:
    unsigned    numStreams;
    
    struct Source
    {
        GLenum type;
        GLMMVERTEXDESCRIPTION desc;
    };
    
    Source* sources;
    unsigned numSources;
public:
    VertexDefinition (unsigned numberOfSources);
    ~VertexDefinition ();
    
    void SetSource (unsigned idx, const GLMMVERTEXDESCRIPTION& desc);
    unsigned GetNumberOfStreams () const;
    
    void SetupStreams ();
    
    unsigned GetNumberOfDescriptions () const;
    const GLMMVERTEXDESCRIPTION& GetDescription (unsigned idx) const;
        
};

#endif	/* VERTEXDEFINITION_H */

